#ifndef SRC_FILE_EXPLORER_H
#define SRC_FILE_EXPLORER_H

#include "../lvgl/lvgl.h"

#define FILE_EXPLORER_PATH_MAX_LEN 128
#define FILE_TABLE_COLUMN_COUNT 3

typedef struct {
    lv_obj_t * event_obj;
    lv_obj_t * cont;
    lv_obj_t * head_area;
    lv_obj_t * brower_area;
    lv_obj_t * file_table;
    lv_obj_t * path_label;
    char * cur_file;
    char   cur_path[FILE_EXPLORER_PATH_MAX_LEN];
} file_explorer_t;


void file_explorer_ui_init(void);


void file_explorer_open_dir(char * path);

/* 点击文件事件处理；点击目录直接进入 */
void file_explorer_register_item_clicked_handler(lv_event_cb_t event_cb, void * user_data);


char *file_explorer_get_cur_path();


char *file_explorer_get_cur_item();


#endif /* #define SRC_FILE_EXPLORER_H */
